<template>
  <div class="markerInfo">
      <div class="manData">
          <h3>男厕环境情况：优</h3>
          <h3>女厕环境情况：优</h3>
          <h3>今日客流量：{{num}}</h3>
      </div>
      <div class="detail">
        <a-button type="primary" @click="gotoToiDetail">详情</a-button>
      </div>
  </div>
</template>

<script>
import {getToiletDetailData} from '../../api'
export default {
    data() {
        return {
            num:0,
        }
    },
    mounted(){
        this.getPicData()
    },
    methods:{
        gotoToiDetail(){
            this.$router.push({ path:'/anotherToi' ,query:{number:'GJ001'}});
            this.$store.commit("cardData", '集团办公室厕所');
        },
        async getPicData(){
            let number = 'GJ001'
            let res = await getToiletDetailData(number)
            this.num = res.woman_data.people.today
        }
    }
}
</script>

<style lang="less">
.markerInfo{
    height: 100%;
    width: 100%;
    padding: 2%;
    .manData{
        width: 100%;
        height: 80%;
        padding: 3%;
        text-align: center;
    }
    .detail{
        width: 100%;
        height: 10%;
        padding-right: 4%;
        text-align: right;
        padding-bottom: 5%;
    }
}
</style>